import http from '../util/request.js'

export default {
    // 获取轮播图列表
    list: () => {
        return http({
            url: '/api/carousel/list',
            method: 'get'
        });
    },

    // 添加轮播图
    add: (obj) => {
        return http({
            url: '/api/carousel',
            method: 'post',
            data: obj,
            headers: {
                'Content-Type': 'application/json'
            }
        });
    },

    // 删除轮播图
    del: (id) => {
        return http({
            url: '/api/carousel/' + id,
            method: 'delete'
        });
    }
}
